﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WebFormTest.Index" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="jq/jquery.min.js"></script>
    <script src="jq/jquery.easyui.min.js"></script>
    <script src="jq/easyui-lang-zh_CN.js"></script>
    <link href="css/easyui.css" rel="stylesheet" />
    <link href="css/icon.css" rel="stylesheet" />
    <script>
        $(function () {
            //tabledatagrid();
            Dates("2016-08-01","2016-09-11");
        })
        function Dates(DStart, DEnd)
        {
            var d1 = new Date(DStart), d2 = new Date(DEnd);
            alert((d2 - d1) / (24 * 3600 * 1000))

        }
        function tabledatagrid() {
            $('#table').datagrid({
                //title: 'crud',
                //iconCls: 'icon-search',
                width: 'auto',
                height: 'auto',
               // collapsible: true,
                url: 'webhandler/index.ashx',
                //loadData: data,
                loadMsg: "正在加载，请稍等...",
               // fit: true,
                columns: [[
                    {
                        field: 'SId', title: '学号'
                    }, {
                        field: 'SHead', title: '照片'
                    }, {
                        field: 'SName', title: '姓名'
                    }, {
                        field: 'SAge', title: '年龄'
                    }, {
                        field: 'SSex', title: '性别'
                    }, {
                        field: 'SPhone', title: '电话'
                    },
                ]]
            })
        }
        //function searchtable() {
        //    $.post('webhandler/index.ashx', {}, function (data) {

        //        login = $.parseJSON(data);
        //        tabledatagrid(login);
        //    })
        //}
    </script>
</head>
<body>
    <table id="table">
    </table>
</body>
</html>

